package com.yunxin.core.domain.service.product.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yunxin.core.domain.service.product.ProductQualityConfigService;
import com.yunxin.core.infra.persistence.entity.product.ProductQualityConfig;
import com.yunxin.core.infra.persistence.mapper.product.ProductQualityConfigMapper;
import org.springframework.stereotype.Service;

@Service
public class ProductQualityConfigServiceImpl extends ServiceImpl<ProductQualityConfigMapper, ProductQualityConfig> implements ProductQualityConfigService {

    @Override
    public ProductQualityConfig selectQualityByProductId(Long productId) {
       return baseMapper.selectOne(new QueryWrapper<ProductQualityConfig>().eq("product_id", productId).eq("is_del",0));
    }
}
